// Dog 
class Animal{
    constructor(name) {
        this.name=name;
        this.thirst=100;
        this.belly=[]
    }
    drink(){
        this.thirst-=10;
        return this;
    }
    eat(food){
        this.belly.push(food);
        return this
    }
}
class Dog extends Animal{
    constructor(name,breed) {
        super(name);
        this.breed=breed;
    }
}
const sunny= new Dog('sunny','yyy');
sunny
.drink()
.eat('烤鱼')
console.log(sunny);